import http from './http.js'
import path from './path.js'

// 模拟登录函数
export function login({ account, password }) {
    return new Promise((resolve, reject) => {
      // 模拟后端的延迟
      setTimeout(() => {
        const user = mockUsers.find(
          (u) => u.account === account && u.password === password
        );
        if (user) {
          resolve({ token: user.token });
        } else {
          reject(new Error('Invalid account or password'));
        }
      }, 1000);
    });
  }
  